from typing import Optional
from decimal import Decimal
from sqlmodel import SQLModel, Field
from datetime import datetime

class DrugTrace(SQLModel, table=True):
    """药品追溯模型 - 对应文档3表结构"""
    __tablename__ = "drug_trace"

    # 主键字段
    id: Optional[str] = Field(primary_key=True, description="主键ID")
    ord_detl_code: Optional[str] = Field(default=None, description="订单明细代码")
    drug_trac_codg: Optional[str] = Field(default=None, description="药品追溯编码")
    trac_codg_pac_hery: Optional[str] = Field(default=None, description="追溯编码包装层级")
    created_at: Optional[datetime] = Field(default=None, description="创建时间")


__all__ = ["DrugTrace"]